//
//  ModelOfForumData.m
//  FreeTravel
//
//  Created by 徐康 on 16/9/12.
//  Copyright © 2016年 KX. All rights reserved.
//

#import "ModelOfForumData.h"
#import "ModelOfForumPublish_types.h"
#import "ModelOfForumTypes.h"
@implementation ModelOfForumData
- (void)setValue:(id)value forKey:(NSString *)key{
    [super setValue:value forKey:key];
    NSMutableArray *arr1 = [NSMutableArray array];
    NSMutableArray *arr2 = [NSMutableArray array];
    if ([key isEqualToString:@"id"]) {
        self.ID = [value integerValue];
        
    }if ([key isEqualToString:@"total_threads"]) {
        self.total_threads = [value integerValue];
    }if ([key isEqualToString:@"description"]) {
        self.Description = value;
    }if ([key isEqualToString:@"publish_types"]) {
        for (NSDictionary *dic in value) {
            ModelOfForumPublish_types *model = [ModelOfForumPublish_types modelWithDic:dic];
            [arr1 addObject:model];
        }
        self.publish_types = arr1;
    }if ([key isEqualToString:@"types"]) {
        for (NSDictionary *dic in value) {
            ModelOfForumTypes *model = [ModelOfForumTypes modelWithDic:dic];
            [arr2 addObject:model];
        }
        self.types = arr2;
    }
}
@end
